package PenTest.meituan241027.acm1;

import java.util.*;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {

    static Set<Integer> set = new HashSet<>();

    static List<Integer> list = new ArrayList<>();

    static int odd = 0;

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[] array = new int[n];
        // 注意 hasNext 和 hasNextLine 的区别
        for (int i = 0; i < n; i++) {
            array[i] = in.nextInt();
        }
        backTrack(array, 0);
        System.out.println(set.size());
    }

    private static void backTrack(int[] array, int start) {
        if (odd > 0 && odd % 2 == 0) {
            set.add(list.stream().mapToInt(i -> (array[i])).sum());
        }
        if (start == array.length) {
            return;
        }
        for (int i = start; i < array.length; i++) {
            list.add(i);
            if (array[i] % 2 == 1) {
                odd++;
            }
            backTrack(array, i + 1);
            list.remove(list.size() - 1);
            if (array[i] % 2 == 1) {
                odd--;
            }
        }
    }
}